<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>jquery.confirm</title>
    <link href="confirm.css" type="text/css" rel="stylesheet"/>
</head>
<body>
    <button id='confirm'>CONFIRM</button>
    <button id='tip'>TIP</button>
    <button id='loading'>LOADING</button>
    <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="confirm.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function(){
            $('#confirm').on('click', function(){
                $.confirm({
                    message: '这是一个确认框'
                });
            });
            var loading = $.loading();
            $('#loading').on('click', function(){
                loading.show('加载中...');
                setTimeout(function(){
                    loading.hide();
                }, 5000);
            });
        });
    </script>
</body>
</html>